﻿Public Class MainMenu
    Public empid As Int16
    Public empname As String
    Public usertypeid As Int16
    Public usertype As String
    Public username As String
    Public userid As Int16
    Public adjust As Int16
    Public Admin As Int16
    Public candidate As Int16
    Public employee As Int16

    Private Sub SystemToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SystemToolStripMenuItem.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lblname.Visible = False
        lbluser.Text = Me.username
        lblname.Text = Me.empname
        If employee = 0 Then
            Me.MenuStrip2.Items(1).Enabled = False
        End If
        If adjust = 0 Then
            Me.MenuStrip2.Items(2).Enabled = False
        End If
        If candidate = 0 Then
            Me.MenuStrip2.Items(3).Enabled = False
        End If
        If Admin = 0 Then
            Me.MenuStrip2.Items(4).Enabled = False
        End If
        'Me.MenuStrip2.Items(0).Enabled = False
        ' MessageBox.Show()
    End Sub

    Private Sub AdjustPostToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdjustPostToolStripMenuItem.Click

    End Sub

    Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click
        Login.Show()
        Me.Close()
    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub ChangePasswordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordToolStripMenuItem.Click
        Dim frm As New ChangePwd
        frm.ShowDialog()
    End Sub

    Private Sub GroupToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupToolStripMenuItem.Click
        Dim frm As New AddGroup
        frm.ShowDialog()
        'frm.MdiParent = Me
    End Sub

    Private Sub GroupMenuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupMenuToolStripMenuItem.Click
        Dim frm As New GroupMenu
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub UserManuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UserManuToolStripMenuItem.Click
        Dim frm As New UserMenu
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub UserToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UserToolStripMenuItem.Click
        Dim frm As New AddUser
        frm.ShowDialog()
        ' frm.MdiParent = Me
    End Sub
End Class
